package com.gaofeng.day07;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class demo2 {
    public static void main(String[] args) {
        //
        Map<String,String> map = new HashMap<>();
        map.put("尹志平","小龙女");
        map.put("郭靖","穆念慈");
        map.put("欧阳克","黄蓉");

        Set<String> keys = map.keySet();

        for (String key : keys) {
            System.out.println(key);
            /** 获取map的值*/

            String value = map.get(key);
            /**打印每个key与值*/

            System.out.println(key+"="+value);
        }


    }
}
